<%@page import="fr.uniscol.model.IUniscolUser"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>  

<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	
	<title>Uniscol</title>
	
	<!-- Latest compiled and minified CSS -->
	<!--<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">-->
	
	<link rel="stylesheet" href="<c:url value="/resources/bootstrap/css/bootstrap.min.css" />">
	<!-- Optional theme -->
	<link rel="stylesheet" href="<c:url value="/resources/bootstrap/css/bootstrap-theme.min.css" />">
	
	<link rel="stylesheet" href="<c:url value="/resources/css/normalize.css" />">
	<link rel="stylesheet" href="<c:url value="/resources/css/main.css" />">
    
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="<c:url value="/resources/js/main.js" />"></script> 

</head>
<body>	
    
<%  
    IUniscolUser utilisateur = (IUniscolUser) session.getAttribute("utilisateur");
%>
<%  if(utilisateur != null && utilisateur.isSuperAdmin()){ %>    
	<jsp:include page="navigation_admin.jsp" />
<%  }else{ %>
    <jsp:include page="navigation.jsp" />
<%  } %>
	
	<c:if test="${not empty alert}">
    	<div id="message" class="${alert.css}" style="margin-top: 70px">
    		<c:if test="${not empty alert.icon}">
    			<span class="${alert.icon}"></span>
    		</c:if>
        	<spring:message code="${alert.messageCode}" text="${alert.defaultMessage}"  htmlEscape="true" />
        </div>
        <!-- <c:remove var="alert" scope="session"/> -->
    </c:if>
    
    <div class="container" style="margin-top: 70px">
        <div class="row">
            <c:if test="${not empty menuContextuel}">
                <div id="menuContextuel" class="menu_contextuel col-md-2">
                    <jsp:include page="${menuContextuel}.jsp" flush="true" />
                </div>
            </c:if>
             
            <div id="contentPage" class="col-md-8" style="margin-left: 300px">
                <jsp:include page="${viewInclude}"></jsp:include>
            </div>
        </div>
    </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->

	<!-- Include all compiled plugins (below), or include individual files as needed -->
	<script src="<c:url value="/resources/bootstrap/js/bootstrap.min.js" />"></script>
</body>
</html>